FROM docker.repo:5000/ppc64le/centos:7.2

#java install
RUN yum -y install java-1.7.0-openjdk.ppc64le

ENV FILESERVER 172.16.0.164
RUN echo "$FILESERVER fileserver" >> /etc/hosts
ADD http://$FILESERVER:8080/base_image/logstash-2.2.2.tar.gz /tmp/pkg2.tar.gz
#logstash
RUN cd /tmp && \
#    wget https://download.elastic.co/logstash/logstash/logstash-2.2.2.tar.gz  -O pkg2.tar.gz && \
    tar -zxf pkg2.tar.gz && mv logstash-* /opt/logstash && \
    rm -rf /tmp/pkg2.tar.gz

ADD logstash_basic.conf /opt/logstash/logstash_basic.conf

EXPOSE 5044

ENTRYPOINT ["/opt/logstash/bin/logstash", "-f", "/opt/logstash/logstash_basic.conf"]


